﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using AnyOffice.Model;

namespace AnyOffice.general.netmeeting.attend
{
    public partial class login : ModulePage
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            int num = (Request.QueryString["session_id"] != null) ? int.Parse(Request.QueryString["session_id"]) : 0;
            NetMeetingUserDao dao = new NetMeetingUserDao();
            NetMeetingUserData data = new NetMeetingUserData();
            UserCache cache = new UserCache();
            data.UserId = base.User.Identity.Name;
            data.SessionId = num;
            data.NickName = cache.UserName;
            dao.Insert(base.Conn, data);
            base.CloseConn();
            Response.Redirect("chat.aspx?session_id=" + num.ToString());
        }

    }
}
